package Quartz;

import org.apache.struts.action.ActionServlet;
import org.apache.struts.config.ModuleConfig;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

public class QuartzOpen implements Job {
	QuartzManager schedulerManager = new QuartzManager();
	
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		
	
		QuartzManager schedulerManager = new QuartzManager();
		String[] open =context.getJobDetail().getKey().getName().toString().split("[+]");
		schedulerManager.updateOpen(open[1],"1");
		
		
		System.out.println("EXAM IS OPEN------------------------------ ~");
		System.out.println("Job name: " + context.getJobDetail().getKey().getName());
		 System.out.println("Trigger name: " + context.getTrigger().getKey().getName());
		  System.out.println("Firing Time: " + context.getFireTime());
	}
}